package libra.model;

import java.io.Serializable;
import java.time.Instant;
import java.util.UUID;

/**
 * Provider支付model
 * @author libra
 */
public class Provider_Pay implements Serializable {
	/**  */
	private static final long serialVersionUID = 5754125287109400824L;
	// 主键
	private Integer id;
	// 订单号
	private String serial;
	// 订单的受理来源
	private String fromProvider; 
	// 创建时间
	private Long createTime;
	// 当前请求操作的受理节点
	private String operator;
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getSerial() {
		return serial;
	}
	public void setSerial(String serial) {
		this.serial = serial;
	}
	public String getFromProvider() {
		return fromProvider;
	}
	public void setFromProvider(String fromProvider) {
		this.fromProvider = fromProvider;
	}
	public Long getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Long createTime) {
		this.createTime = createTime;
	}
	public String getOperator() {
		return operator;
	}
	public void setOperator(String operator) {
		this.operator = operator;
	}
	
	public Provider_Pay() {
	}
	public Provider_Pay( String fromProvider) {
		super();
		this.serial = genUuid();
		this.fromProvider = fromProvider;
		this.createTime = Instant.now().getEpochSecond();
	}
	
	public static String genUuid() {
		return UUID.randomUUID().toString().replaceAll("-", "");
	}
}
